package com.phantasy.managers.ui.style
{
	import com.phantasy.ui.skins.CheckBoxSkin;
	import com.phantasy.ui.skins.ListSkin;
	import com.phantasy.ui.skins.NumericStepperSkin;
	import com.phantasy.ui.skins.PageBarSkin;
	import com.phantasy.ui.skins.PageSimpleBarSkin;
	import com.phantasy.ui.skins.PanelSkin;
	import com.phantasy.ui.skins.ScrollBarSkin;
	import com.phantasy.ui.skins.Skin;
	import com.phantasy.ui.skins.SliderSkin;
	import com.phantasy.ui.skins.TabBarSkin;
	import com.phantasy.ui.skins.TabNavigationSkin;
	import com.phantasy.ui.style.IStyle;
	
	import flash.text.TextFormat;

	/**
	 *样式管理器 用于获取各个样式皮肤
	 * @author Liseen
	 * 
	 */	
	public class StyleManager
	{
		private static var instance:StyleManager;
		private var styleProxy:IStyle;
		
		public function StyleManager()
		{
		}
		/**
		 *获取样式管理器实例 
		 * @return 
		 * 
		 */		
		public static function getInstance():StyleManager
		{
			if (instance == null)
			{
				instance = new StyleManager();
			}
			return instance;
		}
		
		public static function get textFormat():TextFormat
		{
			return (instance.styleProxy) ? instance.styleProxy.textFormat : null;
		}
		
		public static function get buttonSkin():Skin
		{
			return (instance.styleProxy) ? instance.styleProxy.buttonSkin : null;
		}
		
		public static function get selectedSkin():Skin
		{
			return (instance.styleProxy) ? instance.styleProxy.selectedSkin : null;
		}
		
		public static function get scrollBarSkin():ScrollBarSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.scrollBarSkin : null;
		}
		
		public static function get tabBarSkin():TabBarSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.tabBarSkin : null;
		}
		
		public static function get checkBoxSkin():CheckBoxSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.checkBoxSkin : null;
		}
		
		public static function get comboBoxSkin():Skin
		{
			return (instance.styleProxy) ? instance.styleProxy.comboBoxSkin : null;
		}
		
		public static function get listSkin():ListSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.listSkin : null;
		}
		
		public static function get textInputSkin():Skin
		{
			return (instance.styleProxy) ? instance.styleProxy.textInputSkin : null;
		}
		
		public static function get textAreaSkin():Skin
		{
			return (instance.styleProxy) ? instance.styleProxy.textAreaSkin : null;
		}
		
		public static function get radioButtonSkin():CheckBoxSkin
		{
			return (((instance.styleProxy) ? instance.styleProxy.radioButtonSkin : null));
		}
		
		public static function get panelSkin():PanelSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.panelSkin : null;
		}
		
		public static function get listItemSkin():Skin
		{
			return (instance.styleProxy) ? instance.styleProxy.listItemSkin : null;
		}
		
		public static function get numericStepperSkin():NumericStepperSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.numericStepperSkin : null;
		}
		
		public static function get textScrollSkin():ScrollBarSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.textScrollSkin : null;
		}
		
		public static function get sliderSkin():SliderSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.sliderSkin : null;
		}
		
		public static function get tabNavigationSkin():TabNavigationSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.tabNavigationSkin : null;
		}
		
		public static function get pageSimpleBarSkin():PageSimpleBarSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.pageSimpleBarSkin : null;
		}
		
		public static function get pageBarSkin():PageBarSkin
		{
			return (instance.styleProxy) ? instance.styleProxy.pageBarSkin : null;
		}
		
		public function setUpStyle(style:IStyle):void
		{
			this.styleProxy = style;
		}
	}
}